package com.eastfair.venuebooking.api;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eastfair.boot.request.PageParams;
import com.eastfair.core.base.R;
import com.eastfair.venueservice.dto.WorkOrderDTO;
import com.eastfair.venueservice.dto.WorkOrderOperationRecordDTO;
import com.eastfair.venueservice.dto.WorkOrderQuery;
import com.eastfair.venueservice.vo.WorkOrderVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 加班申请 Feign.
 *
 * @author dqq
 * @date 2022/10/20
 */
@FeignClient("venue-services-manage/workOrder")
public interface WorkOrderFeign {



    /**
     * 修改派工单.
     *
     * @param workOrderDTO workOrderDTO
     * @return the r
     */
    @PostMapping("/updateWorkOrder")
    R<Boolean> updateWorkOrder(@RequestBody WorkOrderDTO workOrderDTO);

    /**
     * 查询派工单.
     *
     * @return the r
     */
    @PostMapping("/queryWorkOrder")
    R<Page<WorkOrderVO>> queryWorkOrder(@RequestBody PageParams<WorkOrderQuery> workOrderQuery);

    /**
     * 查询派工单明细.
     *
     * @param workOrderQuery workOrderQuery
     * @return the r
     */
    @PostMapping("/queryWorkOrderDetail")
    R<WorkOrderVO> queryWorkOrderDetail(@RequestBody WorkOrderQuery workOrderQuery);

    /**
     * 接收工单.
     *
     * @param workOrderOperationRecordDTO workOrderOperationRecordDTO
     * @return the r
     */
    @PostMapping("/receiveWorkOrder")
    R<Boolean> receiveWorkOrder(@RequestBody WorkOrderOperationRecordDTO workOrderOperationRecordDTO);

    /**
     * 撤销工单.
     *
     * @param workOrderOperationRecordDTO workOrderOperationRecordDTO
     * @return the r
     */
    @PostMapping("/revokeWorkOrder")
    R<Boolean> revokeWorkOrder(@RequestBody WorkOrderOperationRecordDTO workOrderOperationRecordDTO);

    /**
     * 作废工单.
     *
     * @param workOrderOperationRecordDTO workOrderOperationRecordDTO
     * @return the r
     */
    @PostMapping("/cancelWorkOrder")
    R<Boolean> cancelWorkOrder(@RequestBody WorkOrderOperationRecordDTO workOrderOperationRecordDTO);

    /**
     * 完结工单.
     *
     * @param workOrderOperationRecordDTO workOrderOperationRecordDTO
     * @return the r
     */
    @PostMapping("/closeWorkOrder")
    R<Boolean> closeWorkOrder(@RequestBody WorkOrderOperationRecordDTO workOrderOperationRecordDTO);
}